<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2014.07.11.
   家居公司提交预约($$)*/

!defined('Q_PATH') && exit;

class Addorder_C_Controller extends InitController{

	public function index(){
		$oOrder=new JiajuorderModel();
		
		// 站点属性
		$oOrder->site_id=$this->_oParent->_arrJiajucompany['site_id'];
		$oOrder->jiajucompany_id=$this->_oParent->_arrJiajucompany['jiajucompany_id'];

		$oOrder->jiajuorder_time=strtotime(Q::G('jiajuorder_time'));
		$oOrder->jiajuorder_status=0;
		$oOrder->save();
		if($oOrder->isError()){
			$this->E($oOrder->getErrorMessage());
		}else{
			Jiaju_Credit::RUN($this->_oParent->_arrJiajucompany['jiajucompany_id'],$oOrder->jiajuorder_id,$oOrder->create_dateline,1,0,'','jiajuorder');

			$this->A($oOrder->toArray(),'预约提交成功，请耐心等待商家联系您。',1);
		}
	}

}
